<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>什么是编译的作用域</title>
</head>
<body>
<div id="app">
  <cpn v-show="isShow"></cpn>
</div>
<template id="cpn">
  <div>
    <h2>这是标题</h2>
    <p>这是内容，哈哈哈</p>
  </div>
</template>

<script src="../js/vue.js"></script>
<script>
  const app = new Vue({
    el: '#app',
    data: {
      isShow: true
    },
    components: {
      cpn: {
        template: '#cpn',
        data() {
          return {
            isShow: false
          }
        }
      }
    }
  });
</script>
</body>
</html>
